From: Lukáš Tyrychtr Date: Tue, 25 Nov 2025 14:26:09 +0000 (+0100) Subject: capsLockWarning: Mark as not visible to a11y tree when hidden X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~55^2^2~20 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=453759ebf78ea10184bd5c71bad03328bbaad4fb;p=gnome-shell.git capsLockWarning: Mark as not visible to a11y tree when hidden We're animating it away, but not for the a11y tree. This fixes it, so the caps lock warning is not read regardless of the state of the key. Part-of: (cherry picked from commit ccd1a0b8f52e29ccd2356c5d2ac34e473b174cd0) --- diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index a69bffa5f..6cd153727 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -1,3 +1,4 @@ +import Atk from 'gi://Atk'; import Clutter from 'gi://Clutter'; import GObject from 'gi://GObject'; import Pango from 'gi://Pango'; @@ -202,6 +203,14 @@ class CapsLockWarning extends St.Label { let [, height] = this.get_preferred_height(-1); this.natural_height_set = naturalHeightSet; + if (capsLockOn) { + this.add_accessible_state(Atk.StateType.SHOWING); + this.add_accessible_state(Atk.StateType.VISIBLE); + } else { + this.remove_accessible_state(Atk.StateType.SHOWING); + this.remove_accessible_state(Atk.StateType.VISIBLE); + } + this.ease({ height: capsLockOn ? height : 0, opacity: capsLockOn ? 255 : 0,